import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import api from './api'

import moment from 'moment'
import { authButton } from './utils/tool'
import {uploadUrl,imgUrl} from './utils/config'
import './assets/css/global.css'
import './assets/font/iconfont.css'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI,{size:'mini'})

const pagination =()=>import('./components/pagination')
Vue.component('pagination',pagination)

Vue.prototype.$axios = api
Vue.prototype.imgUrl = imgUrl
Vue.prototype.uploadUrl = uploadUrl
Vue.prototype.$authButton = authButton

// 日期moment筛选器
Vue.filter('dataFormat',(dataStr,pattern = 'YYYY-MM-DD HH:mm') => moment(dataStr).format(pattern))

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
